wayland: Don't provide gsetting if dconf is not available
authorMatthias Clasen <mclasen@redhat.com>
Mon, 27 Nov 2017 00:40:28 +0000 (19:40 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 27 Nov 2017 00:40:28 +0000 (19:40 -0500)
This makes gtk+ fall back to reading ~/.config/gtk-3.0/settings.ini
on systems with Wayland, but without dconf (do those exist?).

https://bugzilla.gnome.org/show_bug.cgi?id=790201

gdk/wayland/gdkdisplay-wayland.c

index 453d4039d6eb0ac3f41a96cb5eb5ee9e696a6119..790974b209b7de7a522871f55807b94074d90d9a 100644 (file)
@@ -1818,6 +1818,9 @@ gdk_wayland_display_get_setting (GdkDisplay *display,
 {
   TranslationEntry *entry;
 
+  if (g_hash_table_size (GDK_WAYLAND_DISPLAY (display)->settings) == 0)
+    return FALSE;
+
   entry = find_translation_entry_by_setting (name);
   if (entry != NULL)
     {